V2EX  ›  英汉词典
Enqueued related words: Bounds, Indexerror, Off-By-One

Index Out Of Range

释义 Definition

“index out of range”常指索引超出范围:在编程或数据处理中,你试图用一个不存在的位置编号(索引)去访问数组/列表/字符串等序列,导致错误或异常。(不同语言中也常见为 IndexErrorIndexOutOfRangeException 等相关报错。)

发音 Pronunciation (IPA)

/ˈɪn.dɛks aʊt əv reɪndʒ/

例句 Examples

I got an index out of range error when I tried to access the 10th item in a list of 5.
当我试图访问一个只有5个元素的列表里的第10个元素时,出现了索引超出范围的错误。

The bug happened because the loop ran one extra time, causing an index out of range when reading the array.
这个漏洞发生的原因是循环多执行了一次,读取数组时就导致了索引超出范围。

词源 Etymology

这是由三个常见英语词组成的技术短语:index(索引/编号)+ out of(超出)+ range(范围)。最早广泛流行于计算机与编程语境中,用来描述“用索引访问数据结构时越界”的典型问题;在不同编程语言与运行环境里,会以相近措辞作为错误信息出现。

相关词 Related Words

文学与作品 Literary & Works

  • The C# Programming Language(在讲解数组/集合与异常处理时常出现 IndexOutOfRangeException 与“index out of range”相关表述)
  • Python Cookbook(涉及序列处理与错误排查时常讨论索引越界问题,与“index out of range”同类错误信息密切相关)
  • Effective Java(在讲解数组、边界检查与异常设计时经常讨论“越界访问”的典型错误情境,与该短语所指概念一致)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2695 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 04:22 · PVG 12:22 · LAX 20:22 · JFK 23:22
♥ Do have faith in what you're doing.